package com.itheima.practice;

import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;
import java.util.Set;

public class p02 {
    //要求抽查到男生的概率为%70
    public static void main(String[] args) {
        ArrayList<String> boylist = new ArrayList<>();
        ArrayList<String> girllist = new ArrayList<>();
        ArrayList<Integer> intlist = new ArrayList<>();



        Collections.addAll(boylist, "nan1", "nan2", "nan3", "nan4", "nan5");
        Collections.addAll(girllist, "nv1", "nv2", "nv3");
        Collections.addAll(intlist,1,1,1,1,1,1,1,0,0,0);

        Random r= new Random();
        Collections.shuffle(intlist);
        int i = intlist.get(0);
        if(i==1){
            System.out.println(boylist.get(r.nextInt(boylist.size())));
        }
        else {
            System.out.println(girllist.get(r.nextInt(girllist.size())));
        }

    }

}
